package fileIO;

import java.io.File;
import java.io.IOException;

public class TreeTest {
	public static void main(String[] args) {
		// String directories = "D:\\a\\b\\c\\d\\e\\f\\g\\h\\i";
		// File file = new File(directories);
		//
		// boolean result = file.mkdirs();
		// System.out.println("Status = " + result);
		showDir(1, new File("D:\\"));
	}

	static void showDir(int indent, File file) {
		for (int i = 0; i < indent; i++)
			System.out.print(' ');
		System.out.println(file.getName());
		if (file.isDirectory()) {
			File[] files = file.listFiles();
			for (int i = 0; i < files.length; i++)
				showDir(indent + 4, files[i]);
		}
	}
}
